<template>
	      <div>
                <div class="penalrow selectw100" style="padding:20px 0;">
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle">
                      监测点
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                        <el-select v-model="inspectionUnitTableDateValue" placeholder="请选择" size="mini">
                          <el-option
                            v-for="item in inspectionUnitTableDate"
                            :key="item.inspectionUnitID"
                            :label="item.inspectionUnitName"
                            :value="item.inspectionUnitID">
                          </el-option>
                        </el-select>
                    </div>
                  </div>
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle" style="">
                      能力参数
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                        <el-select v-model="abilityTableDateValue" placeholder="请选择" size="mini">
                          <el-option
                            v-for="item in abilityTableDate"
                            :key="item.abilityID"
                            :label="item.abilityName"
                            :value="item.abilityID">
                          </el-option>
                        </el-select>
                    </div>
                  </div>
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle" style="">
                      样品状态
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                        <el-select v-model="sampleStatusValue" placeholder="请选择" size="mini">
                          <el-option
                            v-for="item in testBatchStatus"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                        </el-select>
                    </div>
                  </div>
                </div>
                <el-table
                    :data="taskListArr"
                    style="width: 100%"
                    :height="taskListTableHeight"
                    border
                    size="mini"
                    highlight-current-row
                    cell-class-name="batchtablecell"
                    @current-change="taskTableRowSelect"
                    key="jiancejieguo"
                    >
                    <el-table-column
                      type="selection"
                      width="55">
                    </el-table-column>
                    <el-table-column
                      label="序号"
                      width="49px"
                      fixed
                      >
                      <template slot-scope="scopea">
                        {{scopea.$index+1}}
                      </template>
                    </el-table-column>
                    <!-- <el-table-column
                      fixed
                      prop="taskName"
                      label="检测任务"
                      min-width="90px"
                      >
                    </el-table-column> -->
                    <el-table-column
                      label="监测点"
                      min-width="90px"
                      fixed
                      >
                    </el-table-column>
                    <!-- <el-table-column
                      label="能力参数"
                      fixed
                      min-width="90px"
                      >
                    </el-table-column> -->
                    <el-table-column
                      label="检测项目"
                      fixed
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="样品编号"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="QC类型"
                      min-width="90px"
                      >
                    </el-table-column>
                    
                    <el-table-column
                      label="原始记录"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="结果数据"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="修约规则"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="保留位数"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="单位"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="状态"
                      min-width="150px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="采样时间（包含日期）"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="采样人"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="现场负责人"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="重测数"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="重录数"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      fixed="right"
                      prop="caozuo"
                      label="操作"
                      min-width="160px"
                      >
                      <template slot-scope="scope">
                        <!-- <el-button @click="editTask(scope.row)" type="text" size="small">查看详情</el-button> -->
                        <!-- <el-button type="text" size="small">审核</el-button> -->
                        <el-button type="text" size="small">追溯</el-button>
                        <!-- <el-button type="text" size="small" v-if="scope.row.taskState=='已创建'">任务签发</el-button> -->
                        <!-- <el-button type="text" size="small" v-on:click="newReport">生成报告</el-button> -->
                      </template>
                    </el-table-column>
                </el-table>
      </div>
</template>

<script>
	import { mapState } from 'vuex'
	export default{
		data(){
			return {
				
			inspectionUnitTableDateValue:'000',
			abilityTableDateValue:'000',
			sampleStatusValue:'000',
			inspectionUnitTableDate:[
                                {
                                  inspectionUnitID:'000',
                                  inspectionUnitName:'所有'
                                },
                                {
                                  inspectionUnitID:'001',
                                  inspectionUnitName:'监测点一'
                                },
                                {
                                  inspectionUnitID:'002',
                                  inspectionUnitName:'监测点二'
                                },
                                {
                                  inspectionUnitID:'003',
                                  inspectionUnitName:'监测点三一'
                                },
                                {
                                  inspectionUnitID:'004',
                                  inspectionUnitName:'监测点四'
                                },
                                {
                                  inspectionUnitID:'005',
                                  inspectionUnitName:'监测点一'
                                },
                                {
                                  inspectionUnitID:'006',
                                  inspectionUnitName:'监测点一'
                                },
                                {
                                  inspectionUnitID:'007',
                                  inspectionUnitName:'监测点一'
                                }
      ],
       taskListArr:[
                    {
                        taskName:'日任务-2018-04-25',
                        taskCode:'10011',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-22'
                    },
                    {
                        taskName:'周任务',
                        taskCode:'10012',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已签发',
                        establishTime:'2018-03-23'
                    },
                    {
                        taskName:'月任务',
                        taskCode:'10013',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已采样',
                        establishTime:'2018-03-24'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10014',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-25'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10015',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-26'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10016',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-27'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10017',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-28'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10018',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-29'
                    },
                    {
                        taskName:'年度比对任务',
                        taskCode:'10019',
                        taskType:'室间比对',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-29'
                    },
                    {
                        taskName:'A用户委托任务',
                        taskCode:'10110',
                        taskType:'委托任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-30'
                    }
      ],
		
			}
		},
		computed:{
			...mapState(['abilityTableDate','testBatchStatus']),
				taskListTableHeight:function(){
		        return (window.innerHeight-360)
		    },
		},
		created(){
			this.getItemsByTask()
		},
//		detection/getItemsByTask.htm
		methods:{
			getItemsByTask(){
					this.$http({
							          method: 'post', 
							          apiUrl: '/detection/getItemsByTask.htm',
							          params:{id:''},
							          isJson:false,
							       }).then(res=>{
							          if(res.code === 0){
							        	console.log(res)
							          }else{
							          	console.log(err)
							          }   
							        })
			},
			taskTableRowSelect(row){
				console.log(row)
			},
		
		}
	}
</script>

<style>
</style>